﻿@model DateTime?
<input type="text" name="@Html.NameForModel()" id="@Html.IdForModel()" value="@(Model > DateTime.MinValue || Model.HasValue ? Model.Value.ToShortDateString() : null)" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">

<script>
layui.use('laydate', function(){
  var laydate = layui.laydate;
  //执行一个laydate实例
  laydate.render({
    elem: '#@Html.IdForModel()' //指定元素
  });
});
</script>